<extend name="Public/base" />

<block name="body">
    <form method="POST" id="form1" action="">
        <input type="hidden" id='report_day' name="report_day" value="{$report_day}"/>
        <!-- 标题栏 -->
        <div class="main-title">
            <h2>
                日报用户数据
                <a onclick="export1();" class="btn confirm btn-default">统计数据导出</a>
                <a onclick="export2();" class="btn confirm btn-default">明细数据导出</a>
                <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
            </h2>
        </div>
        
        <div class="navbar navbar-default" style="margin: 0px;">
         
            <!-- 高级搜索 -->
            <div class="search-form " style="margin-top: 10px;margin-left: 10px;">
                <div class="sleft">
                   统计日期：{$report_day}
                </div>
            </div>
        </div>
       
        <!-- 数据列表 -->
        <div class="data-table table-striped">
            <table class="table table-hover">
                <thead>
                    <tr>           
                        <th width="15%">日期</th>
                        <th width="15%">区域</th>
                        <th width="15%">用户数</th>
                        <th width="15%">总订单数</th>
                        <th width="15%">总收入</th>
                        <th width="15%">剔除优惠收入</th>
                        <th width="15%">平均客单价</th>
                    </tr>
                </thead>
                <tbody>
                <notempty name="_list">
                    <volist name="_list" id="vo">
                        <tr  valign="top">
                            <td>{$vo.report_day}</td>
                            <td><a href="{:U('Report/areaDailyDetail')}&report_day={$vo.report_day}&areaId={$vo.areaId}">{$vo.areaName}</a></td>
                            <td>{$vo.ucnt} </td>
                            <td>{$vo.ocnt} </td>
                            <td>{$vo.amount} </td>
                            <td>{$vo.finalAmount} </td>
                            <td>{$vo['amount']/$vo['ocnt']|substr=0,5} </td>
                        </tr>
                    </volist>
                    <else/>
                    <td colspan="12" class="text-center"> aOh! 暂时还没有内容! </td>
                </notempty>
            </table>
        </div>
        <div class="page">
            {$_page}
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('Report/daily')}');
        
        function export1(){
            var url = "{:U('Report/areaDailyExport')}";
            $("#form1").attr("action", url).submit();
        }
        
        function export2(){
            var url = "{:U('Report/dailyDetailExport')}";
            $("#form1").attr("action", url).submit();
        }
    </script>
</block>
